﻿CREATE PROCEDURE [branding].[GetTextObjects]
	@tag varchar(50),
	@subTag varchar(50)
AS
	select	bt.ID,
			CAST('text' as varchar(10)) as ObjectType,
			bt.Tag,
			bt.SubTag,
			bt.ResourceId,
			bt.Brand,
			bt.ContentLength
	from	branding.[Text] as bt
	where	(@tag is null or @tag = Tag) and
			(@subTag is null or @subTag = SubTag)
	order   by ResourceId;
RETURN 0